import config from '@/config'
import http from '@/utils/request'

export default {
	ActivityCenter: {
		list: {
			url: `${config.API_URL}/activityCenter/list`,
			name: '活动中心类型模板列表',
			post: async function (data = {}) {
				// eslint-disable-next-line no-return-await
				return await http.post(this.url, data)
			}
		}
	},
	OfficialOne: {
		list: {
			url: `${config.API_URL}/officialOne/list`,
			name: '公文活动1列表',
			post: async function (data = {}) {
				// eslint-disable-next-line no-return-await
				return await http.post(this.url, data)
			}
		},
		uploadExcel: {
			url: `${config.API_URL}/officialOne/uploadExcel`,
			name: '活动数据列表文件上传',
			post: async function (data = {}, config = {}) {
				// eslint-disable-next-line no-return-await
				return await http.post(this.url, data, config)
			}
		},
		importExcel: {
			url: `${config.API_URL}/officialOne/importExcel`,
			name: '公文活动1数据列表导入',
			post: async function (data = {}) {
				// eslint-disable-next-line no-return-await
				return await http.post(this.url, data)
			}
		}
	},
	OfficialTwo: {
		list: {
			url: `${config.API_URL}/officialTwo/list`,
			name: '公文活动1列表',
			post: async function (data = {}) {
				// eslint-disable-next-line no-return-await
				return await http.post(this.url, data)
			}
		},
		uploadExcel: {
			url: `${config.API_URL}/officialTwo/uploadExcel`,
			name: '公文活动1数据列表文件上传',
			post: async function (data = {}, config = {}) {
				// eslint-disable-next-line no-return-await
				return await http.post(this.url, data, config)
			}
		},
		importExcel: {
			url: `${config.API_URL}/officialTwo/importExcel`,
			name: '公文活动1数据列表导入',
			post: async function (data = {}) {
				// eslint-disable-next-line no-return-await
				return await http.post(this.url, data)
			}
		}
	},
	Onsale: {
		list: {
			url: `${config.API_URL}/onsale/list`,
			name: '公文活动1列表',
			post: async function (data = {}) {
				// eslint-disable-next-line no-return-await
				return await http.post(this.url, data)
			}
		},
		uploadExcel: {
			url: `${config.API_URL}/onsale/uploadExcel`,
			name: '公文活动1数据列表文件上传',
			post: async function (data = {}, config = {}) {
				// eslint-disable-next-line no-return-await
				return await http.post(this.url, data, config)
			}
		},
		importExcel: {
			url: `${config.API_URL}/onsale/importExcel`,
			name: '公文活动1数据列表导入',
			post: async function (data = {}) {
				// eslint-disable-next-line no-return-await
				return await http.post(this.url, data)
			}
		}
	},
	Store: {
		list: {
			url: `${config.API_URL}/Store/list`,
			name: '公文活动1列表',
			post: async function (data = {}) {
				// eslint-disable-next-line no-return-await
				return await http.post(this.url, data)
			}
		},
		uploadExcel: {
			url: `${config.API_URL}/Store/uploadExcel`,
			name: '公文活动1数据列表文件上传',
			post: async function (data = {}, config = {}) {
				// eslint-disable-next-line no-return-await
				return await http.post(this.url, data, config)
			}
		},
		importExcel: {
			url: `${config.API_URL}/Store/importExcel`,
			name: '公文活动1数据列表导入',
			post: async function (data = {}) {
				// eslint-disable-next-line no-return-await
				return await http.post(this.url, data)
			}
		}
	},
	ActivitySup: {
		ActivityExec: {
			list: {
				url: `${config.API_URL}/ActivityExec/list`,
				name: '执行监管列表',
				post: async function (data = {}) {
					// eslint-disable-next-line no-return-await
					return await http.post(this.url, data)
				}
			}
		}
	}
}
